import request from '../request'

const Api = {
  page: '/api/adminpolicy/stuPrePolicy/page',
  remove: '/api/adminpolicy/stuPrePolicy/remove',
  removeBatch: '/api/adminpolicy/stuPrePolicy/removeBatch',
  save: '/api/adminpolicy/stuPrePolicy/save',
  details: '/api/adminpolicy/stuPrePolicy/selectById',
  update: '/api/adminpolicy/stuPrePolicy/update',
  school: '/api/adminschool/school/page',
  subjectPage: '/api/admindisciplineCategory/disciplineCategory/parentList',
  coursePage: '/api/admincourseBasicInformation/courseBasicInformation/page',
  projectPage: '/api/adminproject/project/page',
}
// 单条删除
export const remove = params => {
  return request.request({
    url: Api.remove,
    params,
    method: 'DELETE'
  })
}
// 批量删除
export const removeBatch = params => {
  return request.request({
    url: Api.removeBatch,
    params,
    method: 'DELETE'
  })
}
// 分页查询
export const page = params => {
  return request.request({
    url: Api.page,
    params,
    method: 'GET'
  })
}
// 新增
export const save = data => {
  return request.request({
    url: Api.save,
    data,
    method: 'POST'
  })
}
// 修改
export const update = data => {
  return request.request({
    url: Api.update,
    data,
    method: 'PUT'
  })
}
// 查询详情
export const details = params => {
  return request.request({
    url: Api.details,
    params,
    method: 'GET'
  })
}
// 获取学校
export const school = params => {
  return request.request({
    url: Api.school,
    params,
    method: 'GET'
  })
}
// 获取学科类别
export const subjectPage = params => {
  return request.request({
    url: Api.subjectPage,
    params,
    method: 'GET'
  })
}
// 获取课程管理
export const coursePage = params => {
  return request.request({
    url: Api.coursePage,
    params,
    method: 'GET'
  })
}
// 获取项目管理
export const projectPage = params => {
  return request.request({
    url: Api.projectPage,
    params,
    method: 'GET'
  })
}
